const getters = {
  sidebar: state => state.app.sidebar,
  size: state => state.app.size,
  device: state => state.app.device,
  dict: state => state.dict.dict,
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  introduction: state => state.user.introduction,
  roles: state => state.user.roles,
  permissions: state => state.user.permissions,
  permission_routes: state => state.permission.routes,
  topbarRouters:state => state.permission.topbarRouters,
  defaultRoutes:state => state.permission.defaultRoutes,
  sidebarRouters:state => state.permission.sidebarRouters,



  // ----------------------------------crm------------------------------
  userInfo: state => state.userCrm.userInfo,
  lang: state => state.appCrm.lang,
  app: state => state.appCrm,
  logo: state => {
    if (state.appCrm.logo) {
      return state.appCrm.logo
    }
    return require('@/assets/logo/logo.png')
  },
  name: state => {
    if (state.appCrm.name) {
      return state.appCrm.name
    }
    return window.WKConfig.companyName
  },
  nowMounth: state => state.appCrm.nowMounth,
  moduleData: state => state.appCrm.moduleData,

  collapse: state => state.appCrm.sidebar.collapse,
  systemAlertShow: state => state.appCrm.systemAlertShow,
  systemAlertProps: state => state.appCrm.systemAlertProps,
  moduleAuth: state => state.appCrm.moduleAuth,
  userList: state => state.userCrm.userList,
  userDeptObj: state => state.userCrm.userDeptObj,
  userDeptMap: state => state.userCrm.userDeptMap,
  searchUserDept: state => state.userCrm.searchUserDept,
  deptList: state => state.userCrm.deptList,

  // 权限
  allAuth: state => state.userCrm.allAuth,
  crm: state => state.userCrm.crm,
  bi: state => state.userCrm.bi,
  manage: state => state.userCrm.manage,
  oa: state => state.userCrm.oa,
  call: state => state.userCrm.call, // 模块权限
  isCall: state => state.crm.isCall, // 当前人权限

  // 路由
  addRouters: state => state.permissionCrm.addRouters,
  crmRouters: state => state.permissionCrm.crmRouters,
  taskExamineRouters: state => state.permissionCrm.taskExamineRouters,
  workLogRouters: state => state.permissionCrm.workLogRouters,
  addressBookRouters: state => state.permissionCrm.addressBookRouters,
  biRouters: state => state.permissionCrm.biRouters,
  manageRouters: state => state.permissionCrm.manageRouters,
  oaRouters: state => state.permissionCrm.oaRouters,
  fmRouters: state => state.permissionCrm.fmRouters,

  // 客户管理信息
  messageNum: state => state.crm.messageNum,
  // 配置信息
  CRMConfig: state => state.appCrm.CRMConfig,
  imageCache: state => state.appCrm.imageCache
}
export default getters
